package edu.kjxy.demo0409;

public class Demo06 {

	public static void main(String[] args) {
		String str = """
				select name, sum(mark)
				from score
				where name like '张%'
				group by name
				having sum(mark)>350
				order by sum(mark)
				""";
		str = str.toUpperCase();	//转大写
		System.out.println(str);
		str = str.toLowerCase();	//转小写
		System.out.println(str);
		
		int start = str.indexOf("having");
		int pos = str.lastIndexOf("order"); //类似indexOF（）,从后往前找
		System.out.println(pos);
		
		System.out.println(str.substring(pos));
		System.out.println(str.substring(start, pos));
	}

}
